package com.xxxx.yoyo.bean;

import java.util.Date;
import java.util.List;

/**
 * 这是订单类，对应数据库的order表
 * @author cai cai
 *
 */
public class Order {
	private Integer id;			//订单编号，只有下单的时候才有编号，刚开始没有编号
	private Double total;		//订单的总金额
	private Integer amount;		//订单中宠物的总数量
	private Integer status;		//订单的状态0表示删除1表示未付款2表示已付款3表示配送中4表示已完成
	private Integer paytype;	//支付方式0表示未支付1表示微信支付2表示支付宝支付3表示货到付款
	private String name;		//收货人姓名
	private String phone;		//收货人的手机号
	private String address;		//收货地址
	private Date systime;		//下单时间
	private Integer userId;		//下单用户的id
	
	//一个订单会有很多购买项
	private List<Item> itemList;	//所有的购买项

	private User user;				//买家信息
	
	
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Double getTotal() {
		return total;
	}

	public void setTotal(Double total) {
		this.total = total;
	}

	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getPaytype() {
		return paytype;
	}

	public void setPaytype(Integer paytype) {
		this.paytype = paytype;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Date getSystime() {
		return systime;
	}

	public void setSystime(Date systime) {
		this.systime = systime;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public List<Item> getItemList() {
		return itemList;
	}

	public void setItemList(List<Item> itemList) {
		this.itemList = itemList;
	}

	@Override
	public String toString() {
		return "Order [id=" + id + ", total=" + total + ", amount=" + amount + ", status=" + status + ", paytype="
				+ paytype + ", name=" + name + ", phone=" + phone + ", address=" + address + ", systime=" + systime
				+ ", userId=" + userId + ", itemList=" + itemList + "]";
	}
	
	
	
}
